#include <stdio.h>
#include <conio.h>
#include <iostream>
using namespace std;
class CPolygon
{
protected:
	int width,height;
public:
	void setValues(int a,int b);
};
void CPolygon::setValues(int a,int b)
	{
		width=a;
		height=b;
	}
class CRentangle:public CPolygon
{
public:
	int area();
};
int CRectangle:public CPolygon
{
public:
	int area();
};
int CRectangle::area()
{
	return(width*height);
}
class CTriangle:public CPolygon
{
public:
	int area();
}
int CTriangle::area()
{
	return(width*height/2);
}
int main()
{
	CRectangle rect;
	CTriangle trgl;
	rect.setValues(4,5);
	trgl.setValues(4,5);
	cout << rect.area() << endl;
	cout << trgl.area() << endl;
	return 0;
}